Adds a new object to the specified collection.
RetVal = object.Add(Name,
DataType [, Precision] [, Scale])
Name
|
String; input-only The name of the column to be added.
|
DataType
|
CaoDataType enum; input-only The data type of the column being added. Specify
one of the following constants:
- kCaoTypeText
- kCaoTypeNumeric
- kCaoTypeInteger
- kCaoTypeDouble
- kCaoTypeDate
- kCaoTypeTime
- kCaoTypeTimestamp
- kCaoTypeBit
- kCaoTypeBlob
|
Precision
|
Integer; input-only; optional The meaning of Precision depends on the DataType
specified, as follows:
kCaoTypeNumeric:
Precision of numeric data.kCaoTypeText:
Length of data in symbols.kCaoTypeBlob:
Length of data in bits.Precision is ignored for all
other data types.
|
Scale
|
Integer; input-only; optional Numeric scale for kCaoTypeNumeric. Ignored for
all other data types.
|
RetVal = object.Add(FieldName,
Value)
FieldName
|
String; input-only The name of the field to be added.
|
Value
|
Variant; input-only The value of the field being added.
|
RetVal = object.Add(DataSource,
Catalog, Schema, Table, Name, DisplayAttributes)
DataSource
|
String; input-only Data source name.
|
Catalog
|
String; input-only Catalog name.
|
Schema
|
String; input-only Schema name.
|
Table
|
String; input-only Table name.
|
Name
|
String; input-only Label template name.
|
DisplayAttributes
|
Variant (String or array of
strings); input-only
Column
names to be displayed as label or format strings. Where a single
string is specified, CAO assumes the string is a format string.
An array of strings is interpreted as a list of column names.
Format strings are compatible with MTEXT format
strings. Refer to database table columns in format strings using
the following syntax:
For example:
Column names are converted to the following
format string:
- #(<column name 1>\P#(<column name
2>)
|
RetVal = object.Add(DataSource,
Catalog, Schema, Table, Name, KeyDescriptions)
DataSource
|
String; input-only Data source name.
|
Catalog
|
String; input-only Catalog name.
|
Schema
|
String; input-only Schema name.
|
Table
|
String; input-only Table name.
|
Name
|
String; input-only Link template name.
|
RetVal = object.Add(DataSource,
Catalog, Schema, Table, Name, SQLText)
DataSource
|
String; input-only Data source name.
|
Catalog
|
String; input-only Catalog name.
|
Schema
|
String; input-only Schema name.
|
Table
|
String; input-only Table name.
|
Name
|
String; input-only Link template name.
|
SQLText
|
String; input-only The SQL statement.
|